﻿using NLog;
using System;

namespace Drive.AlertSystem
{
    public interface IAlertEventBuilder
    {
        IAlertEventBuilder SetLogLevel(LogLevel logLevel);
        IAlertEventBuilder SetBizPath(string bizpath);
        IAlertEventBuilder SetError(string errcode, string errdesc);
        IAlertEventBuilder SetErrorType(string errtype);
        /// <summary>
        /// 设置关联的对象
        /// </summary>
        /// <param name="recordType"></param>
        /// <param name="recordKey"></param>
        /// <returns></returns>
        IAlertEventBuilder SetRecord(string recordType, object recordKey);
        IAlertEventBuilder SetRequest(string id, string reqHead, string reqBody);
        IAlertEventBuilder SetResponse(string respBody, int elapsed);
        LogEventInfo Build();
        LogEventInfo Build(Exception exception);
    }
}